/* ============================================
   GOLF COURSES NEAR ME - STYLESHEET
   Clean, minimal design optimized for mobile
   ============================================ */

/* RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a5f3d;
    --secondary-color: #2d8659;
    --accent-color: #f39c12;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #ddd;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --shadow-light: 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* ACCESSIBILITY */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* CONTAINER */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 40px 20px;
    text-align: center;
    box-shadow: var(--shadow-light);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header .tagline {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.95;
    letter-spacing: 0.3px;
}

/* SEARCH SECTION */
.search-section {
    background: var(--white);
    padding: 40px 20px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: var(--shadow-light);
}

.search-section h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--primary-color);
}

/* SEARCH FORM */
.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    margin-bottom: 25px;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-control {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 35px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 61, 0.1);
}

.form-control:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-search {
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.btn-search:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-search:active {
    transform: translateY(0);
}

.btn-search:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* SHORT DESCRIPTION */
.short-description {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-light);
}

/* AD BLOCK */
.ad-block {
    margin: 30px 0;
    text-align: center;
}

.ad-placeholder {
    background-color: var(--white);
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    padding: 40px 20px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.9rem;
    box-shadow: var(--shadow-light);
}

/* RESULTS SECTION */
.results-section {
    background: var(--white);
    padding: 30px 20px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: var(--shadow-light);
}

.results-section h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.result-count {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.results-note {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 15px;
    font-style: italic;
}

/* RESULTS LIST */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.course-item {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 18px;
    transition: all 0.3s ease;
    border-left: 4px solid var(--secondary-color);
}

.course-item:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.course-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    word-break: break-word;
}

.course-detail {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}

.course-detail strong {
    color: var(--text-dark);
    margin-bottom: 3px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.course-link {
    color: var(--secondary-color);
    text-decoration: none;
    word-break: break-all;
    transition: color 0.3s ease;
    font-weight: 500;
}

.course-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* INFO BOXES */
.info-boxes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin: 40px 0;
}

.info-box {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    border-top: 4px solid var(--secondary-color);
    transition: box-shadow 0.3s ease;
}

.info-box:hover {
    box-shadow: var(--shadow-medium);
}

.info-box h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.info-box p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* FOOTER */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 30px 20px;
    text-align: center;
    margin-top: 50px;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    margin: 0 15px;
    transition: opacity 0.3s ease;
    font-weight: 500;
}

.footer-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE DESIGN - TABLET
   ============================================ */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .header .tagline {
        font-size: 1rem;
    }

    .search-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .btn-search {
        width: 100%;
    }

    .info-boxes {
        grid-template-columns: 1fr;
    }

    .footer-links a {
        display: block;
        margin: 8px 0;
    }

    .search-section {
        padding: 30px 15px;
    }

    .results-section {
        padding: 25px 15px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE
   ============================================ */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    html {
        font-size: 14px;
    }

    .header {
        padding: 25px 15px;
    }

    .header h1 {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }

    .header .tagline {
        font-size: 0.95rem;
    }

    .search-section {
        padding: 20px 15px;
        margin: 20px 0;
    }

    .search-section h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .form-control {
        padding: 10px 35px 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 5px;
    }

    .form-control:focus {
        box-shadow: 0 0 0 2px rgba(26, 95, 61, 0.15);
    }

    .btn-search {
        padding: 10px 20px;
        font-size: 0.85rem;
        letter-spacing: 0.3px;
    }

    .results-section {
        padding: 20px 15px;
        margin: 20px 0;
    }

    .results-section h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .result-count {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .course-item {
        padding: 12px;
        margin-bottom: 10px;
    }

    .course-name {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .course-detail {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .course-detail strong {
        font-size: 0.75rem;
        margin-bottom: 2px;
    }

    .course-link {
        font-size: 0.8rem;
        word-break: break-word;
    }

    .info-box {
        padding: 18px;
        margin-bottom: 15px;
    }

    .info-box h3 {
        font-size: 1.05rem;
        margin-bottom: 10px;
    }

    .info-box p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .short-description {
        font-size: 0.9rem;
        padding: 12px;
        margin-bottom: 20px;
    }

    .ad-placeholder {
        min-height: 80px;
        padding: 25px 15px;
        font-size: 0.85rem;
    }

    .footer {
        padding: 25px 15px;
        margin-top: 30px;
    }

    .footer-links a {
        margin: 6px 0;
        font-size: 0.9rem;
    }

    .footer p {
        font-size: 0.8rem;
        margin-top: 12px;
    }

    .results-note {
        font-size: 0.8rem;
        margin-top: 12px;
    }
}

/* ============================================
   ULTRA-MOBILE (Small phones < 375px)
   ============================================ */
@media (max-width: 360px) {
    html {
        font-size: 13px;
    }

    .header h1 {
        font-size: 1.4rem;
    }

    .search-section h2,
    .results-section h2 {
        font-size: 1.1rem;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    .btn-search {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}
