/* ========================================
   Pastor do Sul - Main Stylesheet
   ======================================== */

/* CSS Variables - Based on STYLE_GUIDE.md */
:root {
    /* Primary Colors */
    --primary-dark: #000000;
    --primary-light: #222222;
    --accent: rgba(255, 138, 0, 1);
    --accent-hover: rgba(230, 125, 0, 1);
    
    /* Neutral Colors */
    --white: #ffffff;
    --off-white: #f7f7f7;
    --light-gray: #e6e6e6;
    --medium-gray: #9a9a9a;
    --dark-gray: #222222;
    --black: #000000;
    
    /* Semantic Colors */
    --success: #2ecc71;
    --error: #e74c3c;
    
    /* Typography */
    --font-primary: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --font-heading: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;
    
    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    
    /* Line Heights */
    --leading-tight: 1.2;
    --leading-normal: 1.6;
    --leading-relaxed: 1.8;
    
    /* Spacing */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 2.5rem;
    --space-6: 3rem;
    --space-8: 4rem;
    --space-10: 5rem;
    --space-12: 6rem;
    
    /* Container Widths */
    --container-xl: 1200px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition: all 300ms ease;
}

/* ========================================
   Reset & Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--dark-gray);
    background-color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

ul {
    list-style: none;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: var(--leading-tight);
    color: var(--primary-dark);
    margin-bottom: var(--space-2);
}

h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
}

h2 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
}

h3 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
}

p {
    margin-bottom: var(--space-3);
    line-height: var(--leading-relaxed);
}

/* ========================================
   Layout
   ======================================== */

.container {
    width: 90%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-2);
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: var(--space-2) 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--primary-dark);
    font-family: var(--font-heading);
}

.logo:hover {
    color: var(--accent);
}

.logo img {
    height: 120px;
    width: auto;
    display: block;
}

/* Hide text label next to logo image as requested */
.logo span { display: none; }

.nav-links {
    display: flex;
    gap: var(--space-4);
    align-items: center;
}

/* Social links in navbar */
.social-links {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}
.social-links a {
    color: var(--white);
    background-color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    line-height: 0; /* avoid text line box affecting SVG centering */
}
.social-links a:hover { background-color: var(--accent-hover); transform: translateY(-2px); }
.social-links svg { width: 20px; height: 20px; display: block; }

/* Ensure navbar social icons stay circular and do not inherit nav link padding/styles */
.nav-links .social-links a {
    padding: 0 !important;
    border-radius: 50% !important;
    width: 34px !important;
    height: 34px !important;
    color: var(--white) !important;
    background-color: var(--accent) !important;
}
.nav-links .social-links svg {
    width: 18px;
    height: 18px;
    display: block;
    stroke: var(--white);
}

.nav-links a {
    color: var(--white);
    font-weight: var(--font-medium);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    background-color: transparent;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-1);
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: var(--transition);
    border-radius: 2px;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    height: 80vh;
    min-height: 500px;
    background: url('../photos/hero.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 140px;
    position: relative;
}

/* No overlay filter on hero photo per brand request */
/* .hero-overlay removed */

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: var(--space-4);
}

/* Hero logo */
.hero-logo {
    height: 180px;
    width: auto;
}
@media (max-width: 768px) {
    .logo img { height: 80px; }
    .hero-logo { height: 130px; }
}

/* ========================================
   Page Header
   ======================================== */

.page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: var(--space-10) 0 var(--space-6) 0;
    margin-top: 140px;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: var(--space-2);
}

.page-header p {
    font-size: var(--text-lg);
    margin-bottom: 0;
    opacity: 0.9;
}

/* ========================================
   Sections
   ======================================== */

.section {
    padding: var(--space-10) 0;
}

/* Reveal animation classes */
.reveal {
    opacity: 0;
    transform: translateY(16px);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 600ms var(--transition), transform 600ms var(--transition);
}

.section-light {
    background-color: var(--white);
}

.section-dark {
    background-color: var(--off-white);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-6);
    color: var(--primary-dark);
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.content-wrapper p {
    font-size: var(--text-lg);
    text-align: justify;
}

/* Content Grid (for image + text layouts) */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.content-text p {
    font-size: var(--text-lg);
    text-align: justify;
}

.content-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* Facilities Grid */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.facility-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.facility-image img:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Dogs Page
   ======================================== */

.dogs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
    margin-top: var(--space-4);
}

.dog-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

.dog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.dog-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.dog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.dog-card:hover .dog-image img {
    transform: scale(1.05);
}

.dog-info {
    padding: var(--space-4);
}

.dog-info h3 {
    color: var(--primary-dark);
    margin-bottom: var(--space-3);
    font-size: var(--text-xl);
}

.dog-details {
    margin-bottom: var(--space-3);
}

.dog-details li {
    padding: var(--space-1) 0;
    border-bottom: 1px solid var(--light-gray);
    font-size: var(--text-sm);
}

.dog-details li:last-child {
    border-bottom: none;
}

.dog-details strong {
    color: var(--primary-dark);
    font-weight: var(--font-semibold);
}

.dog-awards {
    margin-top: var(--space-3);
    padding: var(--space-3);
    background-color: var(--off-white);
    border-radius: var(--radius-md);
}

.dog-awards strong {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--primary-dark);
}

.dog-awards ul {
    list-style: disc;
    padding-left: var(--space-4);
}

.dog-awards li {
    margin-bottom: var(--space-1);
    font-size: var(--text-sm);
    color: var(--dark-gray);
}

.btn-link {
    display: inline-block;
    margin-top: var(--space-3);
    padding: var(--space-2) var(--space-4);
    background-color: var(--accent);
    color: var(--white);
    border-radius: var(--radius-md);
    font-weight: var(--font-semibold);
    transition: var(--transition);
}

.btn-link:hover {
    background-color: var(--accent-hover);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   Contact Page
   ======================================== */

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    margin-top: var(--space-4);
}

.contact-info h2,
.contact-form-wrapper h2 {
    color: var(--primary-dark);
    margin-bottom: var(--space-4);
}

.contact-info p {
    font-size: var(--text-lg);
    margin-bottom: var(--space-4);
}

.contact-details {
    margin-top: var(--space-6);
}

.contact-item {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.contact-icon {
    color: var(--accent);
    flex-shrink: 0;
}

.contact-item h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-1);
    color: var(--primary-dark);
}

.contact-item p,
.contact-item a {
    font-size: var(--text-base);
    margin-bottom: 0;
}

/* Contact Form */
.contact-form {
    background-color: var(--off-white);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: var(--space-4);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-1);
    font-weight: var(--font-semibold);
    color: var(--primary-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.btn-submit {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background-color: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hidden {
    display: none;
}

.form-success {
    background-color: var(--success);
    color: var(--white);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    text-align: center;
    margin-top: var(--space-4);
}

.form-success p {
    margin-bottom: 0;
    font-size: var(--text-lg);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: var(--space-8) 0 var(--space-4) 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

.footer-info h3 {
    color: var(--white);
    margin-bottom: var(--space-3);
}

.footer-info p {
    margin-bottom: var(--space-1);
    opacity: 0.9;
}

.footer-info a {
    color: var(--white);
    text-decoration: underline;
}

.footer-info a:hover {
    color: var(--accent);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.footer-links a {
    color: var(--white);
    opacity: 0.9;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-4);
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0;
    opacity: 0.8;
    font-size: var(--text-sm);
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablets and below (768px) */
@media (max-width: 768px) {
    /* Typography */
    h1 {
        font-size: var(--text-4xl);
    }
    
    h2 {
        font-size: var(--text-2xl);
    }
    
    .hero h1 {
        font-size: var(--text-4xl);
    }
    
    /* Navigation */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 160px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 160px);
        background-color: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--space-6) 0;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        width: 90%;
        text-align: center;
        padding: var(--space-3);
        font-size: var(--text-lg);
    }
    
    /* Hero */
    .hero {
        height: 60vh;
        min-height: 400px;
    }
    
    /* Content Grid */
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    /* Facilities Grid */
    .facilities-grid {
        grid-template-columns: 1fr;
    }
    
    /* Dogs Grid */
    .dogs-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact */
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links ul {
        align-items: center;
    }
}

/* Mobile phones (480px) */
@media (max-width: 480px) {
    /* Typography */
    h1 {
        font-size: var(--text-3xl);
    }
    
    .hero h1 {
        font-size: var(--text-3xl);
    }
    
    /* Spacing */
    .section {
        padding: var(--space-6) 0;
    }
    
    .page-header {
        padding: var(--space-8) 0 var(--space-4) 0;
    }
    
    /* Dog Cards */
    .dog-image {
        height: 250px;
    }
    
    .dog-info {
        padding: var(--space-3);
    }
}

/* Print Styles */
/* ========================================
   Cookie Consent Banner
   ======================================== */

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    border-top: 2px solid var(--light-gray);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: var(--space-4) var(--space-2);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-consent.hide {
    transform: translateY(100%);
}

.cookie-consent-container {
    max-width: var(--container-xl);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.cookie-consent-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.cookie-consent-text {
    color: var(--dark-gray);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

.cookie-consent-text strong {
    font-weight: var(--font-semibold);
    color: var(--black);
}

.cookie-consent-text a {
    color: var(--accent);
    text-decoration: underline;
    transition: var(--transition);
}

.cookie-consent-text a:hover {
    color: var(--accent-hover);
}

.cookie-consent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}

.cookie-consent-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.cookie-consent-btn-primary {
    background-color: var(--accent);
    color: var(--white);
}

.cookie-consent-btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.cookie-consent-btn-secondary {
    background-color: transparent;
    color: var(--dark-gray);
    border: 1px solid var(--light-gray);
}

.cookie-consent-btn-secondary:hover {
    background-color: var(--off-white);
    border-color: var(--medium-gray);
}

.cookie-consent-btn-text {
    background-color: transparent;
    color: var(--medium-gray);
    padding: 0.75rem 1rem;
    text-decoration: underline;
}

.cookie-consent-btn-text:hover {
    color: var(--dark-gray);
}

/* Cookie Preferences Modal */
.cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: var(--space-2);
}

.cookie-preferences-modal.show {
    display: flex;
}

.cookie-preferences-content {
    background-color: var(--white);
    border-radius: var(--radius-md);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.cookie-preferences-header {
    padding: var(--space-4);
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-preferences-header h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--black);
}

.cookie-preferences-close {
    background: none;
    border: none;
    font-size: var(--text-2xl);
    color: var(--medium-gray);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cookie-preferences-close:hover {
    color: var(--black);
}

.cookie-preferences-body {
    padding: var(--space-4);
}

.cookie-category {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--light-gray);
}

.cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.cookie-category-header h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--black);
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--light-gray);
    transition: var(--transition);
    border-radius: 24px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--white);
    transition: var(--transition);
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: var(--accent);
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-category-description {
    font-size: var(--text-sm);
    color: var(--medium-gray);
    line-height: var(--leading-normal);
}

.cookie-preferences-footer {
    padding: var(--space-4);
    border-top: 1px solid var(--light-gray);
    display: flex;
    gap: var(--space-2);
    justify-content: flex-end;
}

/* Responsive Design */
@media (min-width: 768px) {
    .cookie-consent-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .cookie-consent-content {
        flex: 1;
        margin-right: var(--space-4);
    }
    
    .cookie-consent-buttons {
        flex-shrink: 0;
    }
}

@media (max-width: 767px) {
    .cookie-consent {
        padding: var(--space-3) var(--space-2);
    }
    
    .cookie-consent-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-consent-btn {
        width: 100%;
        text-align: center;
    }
    
    .cookie-preferences-content {
        margin: var(--space-2);
    }
    
    .cookie-preferences-footer {
        flex-direction: column;
    }
    
    .cookie-preferences-footer .cookie-consent-btn {
        width: 100%;
    }
}

@media print {
    .navbar,
    .mobile-menu-toggle,
    .footer,
    .cookie-consent,
    .cookie-preferences-modal {
        display: none;
    }
    
    .hero {
        margin-top: 0;
    }
}
