/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, a, img, button, input, textarea, select {
    margin: 0;
    padding: 0;
}

body {
    font-family: Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px; /* Fallback for older browsers */
    padding: clamp(10px, 2vw, 20px);
    overflow-x: hidden;
}

/* Main Card Container */
.card {
    background-color: rgb(255, 255, 255);
    border: 6px solid black;
    max-width: 1200px;
    width: 100%;
    padding: 40px; /* Fallback for older browsers */
    padding: clamp(15px, 4vw, 50px);
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-height: 700px; /* Fallback for older browsers */
    min-height: clamp(400px, 70vh, 700px);
    overflow: auto;
}

/* Photo Section */
.photo-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.photo-section img {
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 2px solid black;
}

/* Aspect-ratio fallback for older browsers */
@supports not (aspect-ratio: 1 / 1) {
    .photo-section {
        position: relative;
    }
    
    .photo-section::before {
        content: '';
        display: block;
        padding-bottom: 100%; /* 1:1 aspect ratio */
    }
    
    .photo-section img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        max-width: 400px;
        max-height: 400px;
    }
}

/* Content Section */
.content-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* Name Heading - Large and Bold */
h1 {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 3.5rem; /* Fallback for older browsers */
    font-size: clamp(2rem, 4vw + 1rem, 5.5rem); /* Fluid scaling */
    font-weight: bold;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-align: center;
    color: black;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Subtitle */
.subtitle {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: normal;
    letter-spacing: 0.1em;
    text-align: center;
    color: #666;
    text-transform: uppercase;
    margin: 0;
}

/* Description */
.description {
    padding-left: 20px;
    border-left: 2px solid black;
}

.description p {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: black;
    margin-bottom: 15px;
    text-align: justify;
}

.description p:last-child {
    margin-bottom: 0;
}

/* Buttons Container */
.buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

/* Button Base Styles */
.buttons a {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 15px 30px;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: normal;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Phone Button - Black Background */
.btn-phone {
    background-color: black;
    color: white;
    border: 2px solid black;
}

.btn-phone:hover {
    background-color: #666;
    border-color: #666;
}

/* Email Button - White Background */
.btn-email {
    background-color: white;
    color: black;
    border: 2px solid black;
}

.btn-email:hover {
    background-color: #666;
    color: white;
    border-color: #666;
}

/* Very Small Mobile - 375px and below */
@media (max-width: 375px) {
    body {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
        gap: 20px;
    }
    
    h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .subtitle {
        font-size: 0.75rem;
    }
    
    .description {
        padding-left: 15px;
    }
    
    .buttons a {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Small Mobile - 376px to 480px */
@media (min-width: 376px) and (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .card {
        padding: 20px;
    }
}

/* Desktop Layout - 768px and up */
@media (min-width: 768px) {
    .card {
        flex-direction: row;
        gap: 50px;
    }
    
    .photo-section {
        width: 40%;
        flex-shrink: 0;
    }
    
    .photo-section img {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }
    
    /* Aspect-ratio fallback for older browsers - desktop */
    @supports not (aspect-ratio: 1 / 1) {
        .photo-section img {
            max-width: 100%;
            max-height: 100%;
        }
    }
    
    .content-section {
        width: 60%;
        justify-content: space-between;
    }
    
    h1 {
        text-align: left;
    }
    
    .subtitle {
        text-align: left;
    }
    
    .description {
        padding-left: 20px;
    }
    
    .buttons {
        flex-direction: row;
        gap: 20px;
    }
    
    .buttons a {
        flex: 1;
    }
}

/* Tablet Portrait - 768px to 1024px (optimized layout) */
@media (min-width: 768px) and (max-width: 1024px) {
    .card {
        padding: 30px;
        gap: 30px;
    }
    
    .photo-section {
        width: 35%;
    }
    
    .content-section {
        width: 65%;
    }
}

/* Large Desktop - 1024px and up */
@media (min-width: 1024px) {
    /* h1 font-size handled by clamp() - no override needed */
}

/* Print Styles */
@media print {
    body {
        background-color: white;
        padding: 0;
    }
    
    .card {
        border: 1px solid black;
        padding: 20px;
        min-height: auto;
        max-width: 100%;
        box-shadow: none;
    }
    
    .photo-section img {
        border: 1px solid black;
    }
    
    .btn-phone,
    .btn-email {
        border: 1px solid black;
        background-color: white !important;
        color: black !important;
        page-break-inside: avoid;
    }
    
    .btn-phone:hover,
    .btn-email:hover {
        background-color: white !important;
        color: black !important;
    }
    
    .buttons {
        page-break-inside: avoid;
    }
}

